import request from '@/utils/request'


/**查询经销商（商家）列表 */
export function distributorSlist(params) {
  return request({
    url: '/distribution/distributor/list',
    params
  })
}


/**查询商家：运费设置分页数据 */
export function sellerFreightList(params) {
  return request({
    url: '/distribution/express/sellerFreightList',
    params
  })
}

/**区分地区：初始化接口 */
export function expressDistrictInit(params) {
  return request({
    url: '/distribution/expressDistrict/init',
    method:'GET' ,
    params
  })
}

/**查看商家：表格结构 */
export function expressDistrictTable() {
  return request({
    url: `/distribution/expressDistrict/tempQuery`,
    method:'GET' ,
  })
}

/**修改区分地区的快递 */
export function expressDistrict(data) {
  return request({
    url: `/distribution/expressDistrict`,
    method:'PUT' ,
    data
  })
}

/**查看商家：表格结构 */
export function table(params) {
  return request({
    url: `/distribution/expressDistrict/table`,
    params
  })
}



























/**导入卖家SKU组合 */
export function importSellerCombination(data) {
  return request({
    url: '/distribution/skuShop/importSellerCombination',
    method: 'post',
    data
  })
}




/**新增店铺SKU组合 */
export function insertDistributorShopCombination(data) {
  return request({
    url: '/distribution/distributorShopCombination/insertDistributorShopCombination',
    method: 'post',
    data
  })
}




/**修改店铺SKU组合 */
export function updatesDistributorShopCombination(data) {
  return request({
    url: '/distribution/distributorShopCombination/updatesDistributorShopCombination',
    method: 'post',
    data
  })
}


/**删除店铺SKU组合 */
export function deleteDistributorShopCombination(id) {
  return request({
    url: '/distribution/distributorShopCombination/deleteDistributorShopCombination/'+id,
    method: 'DELETE',
  })
}



/**查询SKU列表 */
export function getCombinationSkuListById(params) {
  return request({
    url: '/distribution/distributorShopCombination/getCombinationSkuListById',
    params
  })
}

/**组合追加SKU */
export function bindCombinationSku(data) {
  return request({
    url: '/distribution/distributorShopCombination/bindCombinationSku',
    method: 'post',
    data
  })
}


/**删除组合里面的SKU */
export function deleteDistributorShopCombinationSku(id) {
  return request({
    url: '/distribution/distributorShopCombination/deleteDistributorShopCombinationSku/'+id,
    method: 'DELETE',
  })
}



/**修改组合sku数量 */
export function updateCombinationSkuNum(data) {
  return request({
    url: '/distribution/distributorShopCombination/updateCombinationSkuNum',
    method: 'post',
    data
  })
}

/**不限地区：初始化接口 */
export function init(params) {
  return request({
    url: '/distribution/express/init',
    params
  })
}


/**查询商家：不限地区的快递列表 传distrId！！*/
export function list(params) {
  return request({
    url: '/distribution/express/tempQuery',
    params
  })
}

/**查询商家：不限地区的快递列表 传distrId！！*/
export function update(data) {
  return request({
    url: '/distribution/express',
    method: 'put',
    data
  })
}